<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container {
            width: 800px;
            height: 600px;
            outline: 1px solid red;
        }
        .mask {
            width: 100%;
            height: 100%;
            background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
            opacity: 0;
            transition: opacity 1s ease;
            position: relative;
        }
        .container:hover .mask {
            opacity: 1;
        }
        .loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
        }
        .icon {
            animation: loading 1s linear infinite;
        }

        @keyframes loading {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }

    </style>
</head>
<body>
    <div class="container">
        <div class="mask">
            <div class="loading">
                <div class="icon">?</div>
                <div class="content">loading...</div>
            </div>
        </div>
    </div>
</body>
</html>